#!/bin/bash
echo "Starting..."
ETH=$(/sbin/ifconfig | grep eth | awk -F ' ' ' {print $1} ')
for iface in $ETH
do
MF=$(/sbin/ifconfig $iface | grep 1.2.3.4 | awk -F ' ' ' {print $3} ')
if [ ! -z $MF ]; then
    /sbin/ifconfig $iface down
fi
done
echo "Cleanup done..."
